find the value of smallest value of n